﻿<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            DataBind();
        }
    </script>

    <style type="text/css">
        .sortable1, .sortable2 { list-style-type: none; margin: 0; padding: 0; zoom: 1; }
        .sortable1 li, .sortable2 li { margin: 0 5px 5px 5px; padding: 3px; padding-left: 1.5em; }
        .sortable1 li span, .sortable2 li span { position: absolute; margin-left: -1.3em; }
        .docs { clear: left; font-weight: normal; font-size: 12pt; margin: 0; padding: 0.5em 0 1em; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <h3 class="docs">
        Cancel sorting (but keep as drop targets):</h3>
    <DotNetAge:SimpleListView ID="SimpleListView1" runat="server" CssClass="ui-helper-reset sortable1">
        <ItemTemplate>
            <span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
            <%# Eval("Text") %>
        </ItemTemplate>
        <Items>
            <DotNetAge:SimpleListItem CssClass="ui-state-default" Text="Item 1" />
            <DotNetAge:SimpleListItem CssClass="ui-state-default ui-state-disabled" Text=" (I'm not sortable or a drop target)" />
            <DotNetAge:SimpleListItem CssClass="ui-state-default ui-state-disabled" Text="(I'm not sortable or a drop target)" />
            <DotNetAge:SimpleListItem CssClass="ui-state-default" Text="Item 4" />
        </Items>
    </DotNetAge:SimpleListView>
    <h3 class="docs">
        Cancel sorting (but keep as drop targets):</h3>
    <DotNetAge:SimpleListView ID="SimpleListView2" runat="server" CssClass="ui-helper-reset sortable2">
        <ItemTemplate>
            <span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
            <%# Eval("Text") %>
        </ItemTemplate>
        <Items>
            <DotNetAge:SimpleListItem CssClass="ui-state-default" Text="Item 1" />
            <DotNetAge:SimpleListItem CssClass="ui-state-default ui-state-disabled" Text=" (I'm not sortable)" />
            <DotNetAge:SimpleListItem CssClass="ui-state-default ui-state-disabled" Text="(I'm not sortable)" />
            <DotNetAge:SimpleListItem CssClass="ui-state-default" Text="Item 4" />
        </Items>
    </DotNetAge:SimpleListView>
    <DotNetAge:Sortable ID="SortablePlugin1" runat="server">
        <Target TargetID="SimpleListView1" />
        <DisableSortableItems Selector="li:not(.ui-state-disabled)" />
    </DotNetAge:Sortable>
    <DotNetAge:Sortable ID="SortablePlugin2" runat="server">
        <Target TargetID="SimpleListView2" />
        <DisableDraggingElements Selector=".ui-state-disabled" />
    </DotNetAge:Sortable>
    </form>
</body>
</html>
